<h1>Listing questions</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Status</th>
    <th>Student</th>
  </tr>

<% @questions.each do |question| %>
  <tr>
    <td><%=h question.title %></td>
    <td><%=h question.status %></td>
    <td><%=h question.student_id %></td>
    <td><%= link_to 'Show', question %></td>
    <td><%= link_to 'Edit', edit_question_path(question) %></td>
    <td><%= link_to 'Destroy', question, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New question', new_question_path %>